Optimal. Leaf size=110 \[ \frac{a^3 (c+3 d) \cos ^3(e+f x)}{3 f}-\frac{4 a^3 (c+d) \cos (e+f x)}{f}-\frac{3 a^3 (4 c+5 d) \sin (e+f x) \cos (e+f x)}{8 f}+\frac{5}{8} a^3 x (4 c+3 d)-\frac{a^3 d \sin ^3(e+f x) \cos (e+f x)}{4 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0967658, antiderivative size = 117, normalized size of antiderivative = 1.06, number of steps used = 8, number of rules used = 6, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.261, Rules used = {2751, 2645, 2638, 2635, 8, 2633} \[ \frac{a^3 (4 c+3 d) \cos ^3(e+f x)}{12 f}-\frac{a^3 (4 c+3 d) \cos (e+f x)}{f}-\frac{3 a^3 (4 c+3 d) \sin (e+f x) \cos (e+f x)}{8 f}+\frac{5}{8} a^3 x (4 c+3 d)-\frac{d \cos (e+f x) (a \sin (e+f x)+a)^3}{4 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2751
Rule 2645
Rule 2638
Rule 2635
Rule 8
Rule 2633
Rubi steps
\begin{align*} \int (a+a \sin (e+f x))^3 (c+d \sin (e+f x)) \, dx &=-\frac{d \cos (e+f x) (a+a \sin (e+f x))^3}{4 f}+\frac{1}{4} (4 c+3 d) \int (a+a \sin (e+f x))^3 \, dx\\ &=-\frac{d \cos (e+f x) (a+a \sin (e+f x))^3}{4 f}+\frac{1}{4} (4 c+3 d) \int \left (a^3+3 a^3 \sin (e+f x)+3 a^3 \sin ^2(e+f x)+a^3 \sin ^3(e+f x)\right ) \, dx\\ &=\frac{1}{4} a^3 (4 c+3 d) x-\frac{d \cos (e+f x) (a+a \sin (e+f x))^3}{4 f}+\frac{1}{4} \left (a^3 (4 c+3 d)\right ) \int \sin ^3(e+f x) \, dx+\frac{1}{4} \left (3 a^3 (4 c+3 d)\right ) \int \sin (e+f x) \, dx+\frac{1}{4} \left (3 a^3 (4 c+3 d)\right ) \int \sin ^2(e+f x) \, dx\\ &=\frac{1}{4} a^3 (4 c+3 d) x-\frac{3 a^3 (4 c+3 d) \cos (e+f x)}{4 f}-\frac{3 a^3 (4 c+3 d) \cos (e+f x) \sin (e+f x)}{8 f}-\frac{d \cos (e+f x) (a+a \sin (e+f x))^3}{4 f}+\frac{1}{8} \left (3 a^3 (4 c+3 d)\right ) \int 1 \, dx-\frac{\left (a^3 (4 c+3 d)\right ) \operatorname{Subst}\left (\int \left (1-x^2\right ) \, dx,x,\cos (e+f x)\right )}{4 f}\\ &=\frac{5}{8} a^3 (4 c+3 d) x-\frac{a^3 (4 c+3 d) \cos (e+f x)}{f}+\frac{a^3 (4 c+3 d) \cos ^3(e+f x)}{12 f}-\frac{3 a^3 (4 c+3 d) \cos (e+f x) \sin (e+f x)}{8 f}-\frac{d \cos (e+f x) (a+a \sin (e+f x))^3}{4 f}\\ \end{align*}
Mathematica [A] time = 0.510178, size = 120, normalized size = 1.09 \[ -\frac{a^3 \cos (e+f x) \left (30 (4 c+3 d) \sin ^{-1}\left (\frac{\sqrt{1-\sin (e+f x)}}{\sqrt{2}}\right )+\sqrt{\cos ^2(e+f x)} \left (8 (c+3 d) \sin ^2(e+f x)+9 (4 c+5 d) \sin (e+f x)+88 c+6 d \sin ^3(e+f x)+72 d\right )\right )}{24 f \sqrt{\cos ^2(e+f x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.039, size = 178, normalized size = 1.6 \begin{align*}{\frac{1}{f} \left ( -{\frac{{a}^{3}c \left ( 2+ \left ( \sin \left ( fx+e \right ) \right ) ^{2} \right ) \cos \left ( fx+e \right ) }{3}}+{a}^{3}d \left ( -{\frac{\cos \left ( fx+e \right ) }{4} \left ( \left ( \sin \left ( fx+e \right ) \right ) ^{3}+{\frac{3\,\sin \left ( fx+e \right ) }{2}} \right ) }+{\frac{3\,fx}{8}}+{\frac{3\,e}{8}} \right ) +3\,{a}^{3}c \left ( -1/2\,\sin \left ( fx+e \right ) \cos \left ( fx+e \right ) +1/2\,fx+e/2 \right ) -{a}^{3}d \left ( 2+ \left ( \sin \left ( fx+e \right ) \right ) ^{2} \right ) \cos \left ( fx+e \right ) -3\,{a}^{3}c\cos \left ( fx+e \right ) +3\,{a}^{3}d \left ( -1/2\,\sin \left ( fx+e \right ) \cos \left ( fx+e \right ) +1/2\,fx+e/2 \right ) +{a}^{3}c \left ( fx+e \right ) -{a}^{3}d\cos \left ( fx+e \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.1739, size = 231, normalized size = 2.1 \begin{align*} \frac{32 \,{\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a^{3} c + 72 \,{\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a^{3} c + 96 \,{\left (f x + e\right )} a^{3} c + 96 \,{\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a^{3} d + 3 \,{\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} a^{3} d + 72 \,{\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a^{3} d - 288 \, a^{3} c \cos \left (f x + e\right ) - 96 \, a^{3} d \cos \left (f x + e\right )}{96 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.99665, size = 252, normalized size = 2.29 \begin{align*} \frac{8 \,{\left (a^{3} c + 3 \, a^{3} d\right )} \cos \left (f x + e\right )^{3} + 15 \,{\left (4 \, a^{3} c + 3 \, a^{3} d\right )} f x - 96 \,{\left (a^{3} c + a^{3} d\right )} \cos \left (f x + e\right ) + 3 \,{\left (2 \, a^{3} d \cos \left (f x + e\right )^{3} -{\left (12 \, a^{3} c + 17 \, a^{3} d\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{24 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 1.69122, size = 371, normalized size = 3.37 \begin{align*} \begin{cases} \frac{3 a^{3} c x \sin ^{2}{\left (e + f x \right )}}{2} + \frac{3 a^{3} c x \cos ^{2}{\left (e + f x \right )}}{2} + a^{3} c x - \frac{a^{3} c \sin ^{2}{\left (e + f x \right )} \cos{\left (e + f x \right )}}{f} - \frac{3 a^{3} c \sin{\left (e + f x \right )} \cos{\left (e + f x \right )}}{2 f} - \frac{2 a^{3} c \cos ^{3}{\left (e + f x \right )}}{3 f} - \frac{3 a^{3} c \cos{\left (e + f x \right )}}{f} + \frac{3 a^{3} d x \sin ^{4}{\left (e + f x \right )}}{8} + \frac{3 a^{3} d x \sin ^{2}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )}}{4} + \frac{3 a^{3} d x \sin ^{2}{\left (e + f x \right )}}{2} + \frac{3 a^{3} d x \cos ^{4}{\left (e + f x \right )}}{8} + \frac{3 a^{3} d x \cos ^{2}{\left (e + f x \right )}}{2} - \frac{5 a^{3} d \sin ^{3}{\left (e + f x \right )} \cos{\left (e + f x \right )}}{8 f} - \frac{3 a^{3} d \sin ^{2}{\left (e + f x \right )} \cos{\left (e + f x \right )}}{f} - \frac{3 a^{3} d \sin{\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{8 f} - \frac{3 a^{3} d \sin{\left (e + f x \right )} \cos{\left (e + f x \right )}}{2 f} - \frac{2 a^{3} d \cos ^{3}{\left (e + f x \right )}}{f} - \frac{a^{3} d \cos{\left (e + f x \right )}}{f} & \text{for}\: f \neq 0 \\x \left (c + d \sin{\left (e \right )}\right ) \left (a \sin{\left (e \right )} + a\right )^{3} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.37336, size = 186, normalized size = 1.69 \begin{align*} a^{3} c x - \frac{a^{3} d \cos \left (f x + e\right )}{f} + \frac{a^{3} d \sin \left (4 \, f x + 4 \, e\right )}{32 \, f} + \frac{3}{8} \,{\left (4 \, a^{3} c + 5 \, a^{3} d\right )} x + \frac{{\left (a^{3} c + 3 \, a^{3} d\right )} \cos \left (3 \, f x + 3 \, e\right )}{12 \, f} - \frac{3 \,{\left (5 \, a^{3} c + 3 \, a^{3} d\right )} \cos \left (f x + e\right )}{4 \, f} - \frac{{\left (3 \, a^{3} c + 4 \, a^{3} d\right )} \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]